Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle multiple recurrence exclude entries on the same EXDATE line #109

Closed

Conversation

mbafford
Copy link

@mbafford mbafford commented Mar 30, 2022

My company's Exchange server ICS has EXDATE entries in this format (multiple excludes on the same line):

RRULE:FREQ=WEEKLY;UNTIL=20220429T150000Z;INTERVAL=1;BYDAY=FR;WKST=MO
EXDATE;TZID=Eastern Standard Time:20220318T110000,20220401T110000,20220408T
 110000

whereas all existing tests have EXDATE on separate lines - e.g. from recurring.ics test:

RRULE:FREQ=WEEKLY;BYDAY=FR
EXDATE;TZID=Europe/Berlin:20180608T100000
EXDATE;TZID=Europe/Berlin:20180622T100000

This adds a test for my server's format, as well as fixing the code that does not expect component['EXDATE'] to be a vDDDLists object.

Moving exceptions = {} inside the loop brings brings cest.ics test to returning 116 events, but like with #110 , that test is large - I can't easily tell what the "right" answer is (similar problem looks to have affected #110, #97, and #102).

@codecov
Copy link

codecov bot commented Mar 30, 2022

Codecov Report

Merging #109 (7cd93d5) into master (ed6f30e) will decrease coverage by 0.75%.
The diff coverage is 75.00%.

❗ Current head 7cd93d5 differs from pull request most recent head 27198ab. Consider uploading reports for the commit 27198ab to get more accurate results

@@            Coverage Diff             @@
##           master     #109      +/-   ##
==========================================
- Coverage   87.84%   87.08%   -0.76%     
==========================================
  Files           4        4              
  Lines         362      364       +2     
  Branches       93       94       +1     
==========================================
- Hits          318      317       -1     
- Misses         21       22       +1     
- Partials       23       25       +2     
Impacted Files Coverage Δ
icalevents/icalparser.py 87.13% <75.00%> (-1.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed6f30e...27198ab. Read the comment docs.

@mbafford mbafford force-pushed the fix_multiple_exdate_same_line branch 2 times, most recently from 0a829bd to dfd65e9 Compare March 30, 2022 18:06
@eigenmannmartin
Copy link
Member

I merged #97 and incooperated this mr.
Thank you for the awesome contribution and good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants